The Freescale MQX™ RTOS OSA layer provides the OSA services mapped to the MQX software services.
More...
|
| #define | FSL_RTOS_TASK_DEFINE(task, stackSize, name, usesFloat) |
| | Creates a task descriptor that is used to create the task with task_create. More...
|
| |
| #define | task_create(task, priority, param, handler) |
| | Creates and sets the task to active. More...
|
| |
|
|
#define | SIZE_IN_MMT_UNITS(size) ((size + sizeof(_mqx_max_type) - 1) / sizeof(_mqx_max_type)) |
| |
| #define | MSG_QUEUE_DECLARE(name, number, size) |
| | This macro statically reserves the memory required for the queue. More...
|
| |
Data Fields |
|
_mqx_max_type * | one_msg |
| |
|
_mqx_max_type * | msgq |
| |
To be used instead of a standard declaration.
- Parameters
-
| obj | The sync object to create. |
| #define FSL_RTOS_TASK_DEFINE |
( |
|
task, |
|
|
|
stackSize, |
|
|
|
name, |
|
|
|
usesFloat |
|
) |
| |
Value:const uint16_t fslTaskStackSize_##task = stackSize; \
const uint8_t fslTaskName_##task[] = name; \
const bool fslTaskFloatUse_##task = usesFloat
- Parameters
-
| task | The task function. |
| stackSize | Number of elements in the stack for this task. |
| name | String to assign to the task. |
| usesFloat | Boolean that indicates whether the task uses the floating point unit. |
| #define task_create |
( |
|
task, |
|
|
|
priority, |
|
|
|
param, |
|
|
|
handler |
|
) |
| |
Value:
(uint8_t *)fslTaskName_##task, \
fslTaskStackSize_##task, \
NULL, \
priority, \
param, \
fslTaskFloatUse_##task, \
handler)
fsl_rtos_status __task_create(task_t task, uint8_t *name, uint16_t stackSize, task_stack_t *stackMem, uint16_t priority, void *param, bool usesFloat, task_handler_t *handler)
Create a task.
- Parameters
-
| task | The task function. |
| priority | Initial priority of the task. |
| param | Pointer to be passed to the task when it is created. |
| handler | Returns the identifier to be used afterwards to destroy the task. |
- Return values
-
| kSuccess | The task was successfully created. |
| kError | Creation of task failed. |
| #define MSG_QUEUE_DECLARE |
( |
|
name, |
|
|
|
number, |
|
|
|
size |
|
) |
| |
Value:_mqx_max_type mqxq_##name[SIZE_IN_MMT_UNITS(sizeof(LWMSGQ_STRUCT)) + SIZE_IN_MMT_UNITS(size * 4) * number]; \
_mqx_max_type mqxm_##name[SIZE_IN_MMT_UNITS(size * 4)]; \
MQX_OSA_QUEUE name = { \
.one_msg = mqxm_##name, \
.msgq = mqxq_##name, \
}
- Note
- The queue will store pointers to the elements, and no the elements themselves. The element must continue to exist in memory for the receiving end to properly get the contents.
- Parameters
-
| name | Identifier for the memory region. |
| number | Number of elements in the queue. |
| size | Size of element in 4B units. |
| Enumerator |
|---|
| kSyncWaitForever |
Constant to pass for the sync_wait() timeout in order to wait indefinitely.
|
| void rtos_enter_critical |
( |
void |
| ) |
|
Required attention to other system events may be delayed.